package com.cskaoyan.bean;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Kongwo
 * @description
 * @since 2022/05/05 20:36
 */
@Data
@NoArgsConstructor
public class GoodsData {

    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MarketGoods> list;

    public static GoodsData data(long total, Integer pages, Integer limit, Integer page, List list) {
        GoodsData goodsData = new GoodsData();
        goodsData.setTotal((int) total);
        goodsData.setPages(pages);
        goodsData.setPage(page);
        goodsData.setLimit(limit);
        goodsData.setList(list);
        return goodsData;
    }
}
